package com.yanqu.road.server.cmd.orewar.task;

import com.yanqu.road.entity.player.UserPatrons;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.activity.orewar.OreWarMgr;
import com.yanqu.road.utils.executor.GeneralTask;

import java.util.List;
import java.util.Map;

public class CrossOrePatronsAbilityChangeTask  extends GeneralTask {

    private GamePlayer player;

    private int activityId;


    private Map<Integer, List<UserPatrons>> patronsMap;


    public CrossOrePatronsAbilityChangeTask(GamePlayer player, int activityId, Map<Integer, List<UserPatrons>> patronsMap) {
        this.player = player;
        this.activityId = activityId;
        this.patronsMap = patronsMap;
    }

    @Override
    public void doRun() {
        if (patronsMap != null && !patronsMap.isEmpty()) {
            OreWarMgr.crossPatronsAbilityChange(player, activityId, patronsMap);
        }
    }
}
